
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>python调试之pdb - ksnowlv</title>
  <meta name="author" content="律威">

  
  <meta name="description" content="学习python调试可参考官方文档的pdb. 一.在python中,在调试模块添加pdb调试支持. 1
2
3 import pdb; pdb.set_trace() 不然，会遇见类似如下的错误: (Pdb) n
&gt; /Users/ksnowlv/Documents/lvwei &hellip;">
  

  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  
  <link rel="canonical" href="http://ksnowlv.github.io/blog/2014/08/09/python-diao-shi-zhi-pdb">
  <link href="/favicon.png" rel="icon">
  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
  <link href="/atom.xml" rel="alternate" title="ksnowlv" type="application/atom+xml">
  <script src="/javascripts/modernizr-2.0.js"></script>
  <script src="//ajax.useso.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
  <script src="/javascripts/octopress.js" type="text/javascript"></script>
  <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.useso.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.useso.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">

  
  <script type="text/javascript">
    var _gaq = _gaq || [];
     _gaq.push(['_setAccount', 'UA-39546615-2']);
    // _gaq.push(['_trackPageview']);

    // (function() {
    //   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    //   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    //   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    // })();

    _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src='http://droidyue-tools.qiniudn.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
  </script>


</head>

<body   >
  <header role="banner"><hgroup>
  <h1><a href="/">ksnowlv</a></h1>
  
    <h2>回顾过去,总结以往;立足现在,铭记当下;技术为主,笔记而已.</h2>
  
</hgroup>

</header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
  
</ul>
  
<form action="http://google.com/search" method="get">
  <fieldset role="search">
    <input type="hidden" name="q" value="site:ksnowlv.github.io" />
    <input class="search" type="text" name="q" results="0" placeholder="Search"/>
  </fieldset>
</form>
  
<ul class="main-navigation">
  <li><a href="/">博客首页</a></li>
  <li><a href="/blog/archives">文章列表</a></li>
  <!-- <li><a href="/about-me">关于我</a></li>
 -->
</ul>

</nav>
  <div id="main">
    <div id="content">
      <div>
<article class="hentry" role="article">
  
  <header>
    
      <h1 class="entry-title">Python调试之pdb</h1>
    
    
      <p class="meta">
        








  


<time datetime="2014-08-09T14:40:00+08:00" pubdate data-updated="true">Aug 9<span>th</span>, 2014</time>
        
         | <a href="#disqus_thread">Comments</a>
        
      </p>
    
  </header>


<div class="entry-content"><h4>学习python调试可参考官方文档的<a href="https://docs.python.org/2/library/pdb.html">pdb</a>.</h4>

<h4>一.在python中,在调试模块添加pdb调试支持.</h4>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'>    <span class="kn">import</span> <span class="nn">pdb</span><span class="p">;</span>
</span><span class='line'>    <span class="n">pdb</span><span class="o">.</span><span class="n">set_trace</span><span class="p">()</span>
</span><span class='line'>
</span></code></pre></td></tr></table></div></figure>


<p></p>

<h4>不然，会遇见类似如下的错误:</h4>

<pre><code>(Pdb) n
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(38)&lt;module&gt;()
-&gt; nameList = ["One", "Two", "Three", "Four", "Five"]
(Pdb) a
(Pdb) p namelist
*** NameError: NameError("name 'namelist' is not defined",)
</code></pre>

<h4>二.一些常用命令：</h4>

<h4>查看帮助</h4>

<pre><code>help
(Pdb) 
Documented commands (type help &lt;topic&gt;):
========================================
EOF    bt         cont      enable  jump  pp       run      unt   
a      c          continue  exit    l     q        s        until 
alias  cl         d         h       list  quit     step     up    
args   clear      debug     help    n     r        tbreak   w     
b      commands   disable   ignore  next  restart  u        whatis
break  condition  down      j       p     return   unalias  where 
</code></pre>

<p>解释如下:</p>

<pre><code>b/break  &lt;linenumber&gt;   #断点设置在本py的第linenumber行
b/break  &lt;functionname&gt; #断点设置在本py的functionname
b/break                 #列举当前所有的断点
cl/clear                #清除所有断点
cl/clear  &lt;number&gt;      #清除第number个断点 
n/next        #单步运行到下一步
s/step        #进入到函数内部
c/continue    #继续运行
p             #查看当前变量值
l/list        #查看运行到某处代码
a             #查看全部栈内变量
w             #列出目前call stack 中的所在层
d             #在call stack中往下移一层
disable       #取消所有断点的功能,但仍然保留这些断点 
enable        #恢复断点的功能  
j/jump        #跳转到某行执行 
</code></pre>

<h4>代码示例如下:</h4>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
<span class='line-number'>28</span>
<span class='line-number'>29</span>
<span class='line-number'>30</span>
<span class='line-number'>31</span>
<span class='line-number'>32</span>
<span class='line-number'>33</span>
<span class='line-number'>34</span>
<span class='line-number'>35</span>
<span class='line-number'>36</span>
<span class='line-number'>37</span>
<span class='line-number'>38</span>
<span class='line-number'>39</span>
<span class='line-number'>40</span>
<span class='line-number'>41</span>
<span class='line-number'>42</span>
<span class='line-number'>43</span>
<span class='line-number'>44</span>
<span class='line-number'>45</span>
<span class='line-number'>46</span>
<span class='line-number'>47</span>
<span class='line-number'>48</span>
<span class='line-number'>49</span>
<span class='line-number'>50</span>
<span class='line-number'>51</span>
<span class='line-number'>52</span>
<span class='line-number'>53</span>
<span class='line-number'>54</span>
<span class='line-number'>55</span>
<span class='line-number'>56</span>
<span class='line-number'>57</span>
<span class='line-number'>58</span>
<span class='line-number'>59</span>
<span class='line-number'>60</span>
<span class='line-number'>61</span>
<span class='line-number'>62</span>
<span class='line-number'>63</span>
<span class='line-number'>64</span>
<span class='line-number'>65</span>
<span class='line-number'>66</span>
<span class='line-number'>67</span>
<span class='line-number'>68</span>
<span class='line-number'>69</span>
</pre></td><td class='code'><pre><code class='python'><span class='line'><span class="c">#!/usr/bin/python</span>
</span><span class='line'>
</span><span class='line'><span class="kn">import</span> <span class="nn">Queue</span>
</span><span class='line'><span class="kn">import</span> <span class="nn">threading</span>
</span><span class='line'><span class="kn">import</span> <span class="nn">time</span>
</span><span class='line'><span class="kn">import</span> <span class="nn">pdb</span><span class="p">;</span>
</span><span class='line'><span class="n">pdb</span><span class="o">.</span><span class="n">set_trace</span><span class="p">()</span>
</span><span class='line'>
</span><span class='line'><span class="n">exitFlag</span> <span class="o">=</span> <span class="mi">0</span>
</span><span class='line'>
</span><span class='line'><span class="k">class</span> <span class="nc">QThread</span> <span class="p">(</span><span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="p">):</span>
</span><span class='line'>
</span><span class='line'>    <span class="s">&quot;QThread class&quot;</span>
</span><span class='line'>    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">threadID</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">queue</span><span class="p">):</span>
</span><span class='line'>        <span class="n">threading</span><span class="o">.</span><span class="n">Thread</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
</span><span class='line'>        <span class="bp">self</span><span class="o">.</span><span class="n">threadID</span> <span class="o">=</span> <span class="n">threadID</span>
</span><span class='line'>        <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
</span><span class='line'>        <span class="bp">self</span><span class="o">.</span><span class="n">queue</span> <span class="o">=</span> <span class="n">queue</span>
</span><span class='line'>
</span><span class='line'>    <span class="c">#线程函数</span>
</span><span class='line'>    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
</span><span class='line'>        <span class="k">print</span> <span class="s">&quot;Starting &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span>
</span><span class='line'>        <span class="n">process_data</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">queue</span><span class="p">)</span>
</span><span class='line'>        <span class="k">print</span> <span class="s">&quot;Exiting &quot;</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span>
</span><span class='line'>
</span><span class='line'><span class="c">#处理数据</span>
</span><span class='line'><span class="k">def</span> <span class="nf">process_data</span><span class="p">(</span><span class="n">threadName</span><span class="p">,</span> <span class="n">q</span><span class="p">):</span>
</span><span class='line'>    <span class="k">while</span> <span class="ow">not</span> <span class="n">exitFlag</span><span class="p">:</span>
</span><span class='line'>        <span class="n">queueLock</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span>
</span><span class='line'>        <span class="k">if</span> <span class="ow">not</span> <span class="n">workQueue</span><span class="o">.</span><span class="n">empty</span><span class="p">():</span>
</span><span class='line'>            <span class="n">data</span> <span class="o">=</span> <span class="n">q</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
</span><span class='line'>            <span class="n">queueLock</span><span class="o">.</span><span class="n">release</span><span class="p">()</span>
</span><span class='line'>            <span class="k">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s"> processing </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">threadName</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span>
</span><span class='line'>        <span class="k">else</span><span class="p">:</span>
</span><span class='line'>            <span class="n">queueLock</span><span class="o">.</span><span class="n">release</span><span class="p">()</span>
</span><span class='line'>        <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</span><span class='line'>
</span><span class='line'>
</span><span class='line'><span class="n">threadList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;ksnow&quot;</span><span class="p">,</span> <span class="s">&quot;kair&quot;</span><span class="p">,</span> <span class="s">&quot;baby&quot;</span><span class="p">]</span>
</span><span class='line'><span class="n">nameList</span> <span class="o">=</span> <span class="p">[</span><span class="s">&quot;One&quot;</span><span class="p">,</span> <span class="s">&quot;Two&quot;</span><span class="p">,</span> <span class="s">&quot;Three&quot;</span><span class="p">,</span> <span class="s">&quot;Four&quot;</span><span class="p">,</span> <span class="s">&quot;Five&quot;</span><span class="p">]</span>
</span><span class='line'><span class="n">queueLock</span> <span class="o">=</span> <span class="n">threading</span><span class="o">.</span><span class="n">Lock</span><span class="p">()</span>
</span><span class='line'><span class="n">workQueue</span> <span class="o">=</span> <span class="n">Queue</span><span class="o">.</span><span class="n">Queue</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
</span><span class='line'><span class="n">threads</span> <span class="o">=</span> <span class="p">[]</span>
</span><span class='line'><span class="n">threadID</span> <span class="o">=</span> <span class="mi">1</span>
</span><span class='line'>
</span><span class='line'><span class="c"># 创建新线程</span>
</span><span class='line'><span class="k">for</span> <span class="n">tName</span> <span class="ow">in</span> <span class="n">threadList</span><span class="p">:</span>
</span><span class='line'>    <span class="n">thread</span> <span class="o">=</span> <span class="n">QThread</span><span class="p">(</span><span class="n">threadID</span><span class="p">,</span> <span class="n">tName</span><span class="p">,</span> <span class="n">workQueue</span><span class="p">)</span>
</span><span class='line'>    <span class="n">thread</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
</span><span class='line'>    <span class="n">threads</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">thread</span><span class="p">)</span>
</span><span class='line'>    <span class="n">threadID</span> <span class="o">+=</span> <span class="mi">1</span>
</span><span class='line'>
</span><span class='line'><span class="c"># 填充队列</span>
</span><span class='line'><span class="n">queueLock</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span>
</span><span class='line'><span class="k">for</span> <span class="n">word</span> <span class="ow">in</span> <span class="n">nameList</span><span class="p">:</span>
</span><span class='line'>    <span class="n">workQueue</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">word</span><span class="p">)</span>
</span><span class='line'><span class="n">queueLock</span><span class="o">.</span><span class="n">release</span><span class="p">()</span>
</span><span class='line'>
</span><span class='line'><span class="c"># 等待队列清空</span>
</span><span class='line'><span class="k">while</span> <span class="ow">not</span> <span class="n">workQueue</span><span class="o">.</span><span class="n">empty</span><span class="p">():</span>
</span><span class='line'>    <span class="k">pass</span>
</span><span class='line'>
</span><span class='line'><span class="c"># 通知线程是时候退出</span>
</span><span class='line'><span class="n">exitFlag</span> <span class="o">=</span> <span class="mi">1</span>
</span><span class='line'>
</span><span class='line'><span class="c"># 等待所有线程完成</span>
</span><span class='line'><span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">threads</span><span class="p">:</span>
</span><span class='line'>    <span class="n">t</span><span class="o">.</span><span class="n">join</span><span class="p">()</span>
</span><span class='line'><span class="k">print</span> <span class="s">&quot;Exiting Main Thread&quot;</span>
</span></code></pre></td></tr></table></div></figure>


<h4>调试示例如下：</h4>

<pre><code>ksnowlv@ksnowlvdeMacBook-Pro~/Documents/lvwei projects/python$python thread_queue.py 
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(9)&lt;module&gt;()
-&gt; exitFlag = 0
(Pdb) b process_data
Breakpoint 1 at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:27
(Pdb) b 45
Breakpoint 2 at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:45
(Pdb) b 33
Breakpoint 3 at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:33
(Pdb) b
Num Type         Disp Enb   Where
1   breakpoint   keep yes   at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:27
2   breakpoint   keep yes   at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:45
3   breakpoint   keep yes   at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:33
(Pdb) cl 3
Deleted breakpoint 3
(Pdb) b
Num Type         Disp Enb   Where
1   breakpoint   keep yes   at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:27
2   breakpoint   keep yes   at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:45
(Pdb) b 33
Breakpoint 4 at /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py:33
(Pdb) c
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(45)&lt;module&gt;()
-&gt; threadID = 1
(Pdb) p threadList
['ksnow', 'kair', 'baby']
(Pdb) pp nameList
['One', 'Two', 'Three', 'Four', 'Five']
(Pdb) n
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(48)&lt;module&gt;()
-&gt; for tName in threadList:
(Pdb) n
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(49)&lt;module&gt;()
-&gt; thread = QThread(threadID, tName, workQueue)
(Pdb) s
--Call--
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(14)__init__()
-&gt; def __init__(self, threadID, name, queue):
(Pdb) s
&gt; /Users/ksnowlv/Documents/lvwei projects/python/thread_queue.py(15)__init__()
-&gt; threading.Thread.__init__(self)
(Pdb) s
--Call--
&gt; /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py(654)__init__()
-&gt; def __init__(self, group=None, target=None, name=None,
(Pdb) c
Starting ksnow
Starting kair
Starting baby
ksnow processing One
baby processing Two
 kair processing Three
ksnow processing Four
kair processing Five
Exiting baby
Exiting ksnow
Exiting kair
Exiting Main Thread
Exception AttributeError: "'NoneType' object has no attribute 'path'" in &lt;function _remove at 0x10fb59b18&gt; ignored
ksnowlv@ksnowlvdeMacBook-Pro~/Documents/lvwei projects/python$
</code></pre>
</div>


  <footer>
    <p class="meta">
      
  

<span class="byline author vcard">Posted by <span class="fn">律威</span></span>

      








  


<time datetime="2014-08-09T14:40:00+08:00" pubdate data-updated="true">Aug 9<span>th</span>, 2014</time>
      

<span class="categories">
  
    <a class='category' href='/blog/categories/python/'>python</a>
  
</span>


      
<DIV >
作者： <A href="/">律威</A> <BR>
出处： <A href="/">http://ksnowlv.gitcafe.com</A> 
<BR>原创文章，版权声明：自由转载-非商用-非衍生-保持署名
<a href= "http://creativecommons.org/licenses/by-nc-nd/3.0/deed.zh"> Creative Commons BY-NC-ND 3.0 </a>。 </DIV>


    </p>
<!--     
      Included file 'post/sharing.html' not found in _includes directory
     -->
    <p class="meta">
      
        <a class="basic-alignment left" href="/blog/2014/08/09/qi-yue-fen-ipad-tao-bao-ke-hu-duan-you-hua-zong-jie/" title="Previous Post: 七月份iPad客户端优化总结">&laquo; 七月份iPad客户端优化总结</a>
      
      
        <a class="basic-alignment right" href="/blog/2014/08/09/mo-nu-a-jia-lu-you-ling/" title="Next Post: 魔女阿嘉璐-幽灵">魔女阿嘉璐-幽灵 &raquo;</a>
      
    </p>
  </footer>
</article>

  <section>
    <h1>Comments</h1>
    <div id="disqus_thread" aria-live="polite"><div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'ksnowlv';
(function() {
    var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
    
</div>
  </section>

</div>

<aside class="sidebar">
  
    <section>
  <h1>关于我</h1>
  <p>律威,QQ:309235009 微信:ksnowlv</p>
  <p>手机单机游戏/手机网游封神online/手机阅读/腾讯iOS地图客户端&实时公交&开放API(地图&街景)/iPad/iPhone淘宝客户端及性能优化</p>
  <p>目前在银客做银客/简理财/...</p>
  <p>能做一点,是一点;不求大成,不求一万年;积少成多,水到渠成!</p>
</section>
<section>
  <h1>最近发布</h1>
  <ul id="recent_posts">
    
      <li class="post">
        <a href="/blog/2017/04/26/android-drawable/">Android drawable</a>
      </li>
    
      <li class="post">
        <a href="/blog/2017/04/22/iOS-xia-shi-yong-ffmpeg/">iOS下使用ffmpeg</a>
      </li>
    
      <li class="post">
        <a href="/blog/2015/08/19/ios-you-xian-hou-tai-ren-wu/">iOS有限后台任务</a>
      </li>
    
      <li class="post">
        <a href="/blog/2015/08/19/android-xia-jie-ya-suo/">Android下gzip数据流解压缩</a>
      </li>
    
      <li class="post">
        <a href="/blog/2015/08/19/facebook-infer-de-shi-yong/">FaceBook-infer的使用</a>
      </li>
    
  </ul>
</section>
<section>
  <h1>分类</h1>
    <ul id="category-list"><li><a href='/blog/categories/android-jie-ya-suo/'>Android-解压缩 (1)</a></li><li><a href='/blog/categories/androidduo-xian-cheng/'>Android多线程 (3)</a></li><li><a href='/blog/categories/androidcha-jian/'>Android插件 (1)</a></li><li><a href='/blog/categories/androidhui-tu-./'>Android绘图。 (1)</a></li><li><a href='/blog/categories/androidwang-luo/'>Android网络 (1)</a></li><li><a href='/blog/categories/git/'>git (6)</a></li><li><a href='/blog/categories/githubbo-ke/'>github博客 (8)</a></li><li><a href='/blog/categories/ios/'>iOS (6)</a></li><li><a href='/blog/categories/ios-block/'>iOS-block (1)</a></li><li><a href='/blog/categories/ios-bug/'>iOS-Bug (2)</a></li><li><a href='/blog/categories/ios-memory/'>iOS-Memory (4)</a></li><li><a href='/blog/categories/ios-push/'>iOS-push (1)</a></li><li><a href='/blog/categories/ios-ui/'>iOS-UI (2)</a></li><li><a href='/blog/categories/ios-you-hua/'>iOS-优化 (1)</a></li><li><a href='/blog/categories/ios-nei-cun/'>iOS-内存 (1)</a></li><li><a href='/blog/categories/ios-ji-chu/'>iOS-基础 (3)</a></li><li><a href='/blog/categories/ios-duo-xian-cheng/'>iOS-多线程 (3)</a></li><li><a href='/blog/categories/ios-cun-chu/'>iOS-存储 (1)</a></li><li><a href='/blog/categories/ios-an-quan/'>iOS-安全 (1)</a></li><li><a href='/blog/categories/ios-wang-luo/'>iOS-网络 (13)</a></li><li><a href='/blog/categories/ios-jie-ya-suo/'>iOS-解压缩 (1)</a></li><li><a href='/blog/categories/ios-she-ji-mo-shi/'>iOS-设计模式 (1)</a></li><li><a href='/blog/categories/ios-diao-shi/'>iOS-调试 (1)</a></li><li><a href='/blog/categories/iosyou-hua/'>iOS优化 (1)</a></li><li><a href='/blog/categories/iosji-chu/'>iOS基础 (2)</a></li><li><a href='/blog/categories/iosyin-pin/'>iOS音频 (1)</a></li><li><a href='/blog/categories/mac/'>Mac (4)</a></li><li><a href='/blog/categories/mac-duo-xian-cheng/'>Mac-多线程 (1)</a></li><li><a href='/blog/categories/nginx/'>nginx (3)</a></li><li><a href='/blog/categories/php/'>php (3)</a></li><li><a href='/blog/categories/python/'>python (12)</a></li><li><a href='/blog/categories/swift/'>swift (11)</a></li><li><a href='/blog/categories/uml/'>UML (8)</a></li><li><a href='/blog/categories/xcode/'>Xcode (11)</a></li><li><a href='/blog/categories/chan-pin-she-ji/'>产品设计 (2)</a></li><li><a href='/blog/categories/gong-ju/'>工具 (2)</a></li><li><a href='/blog/categories/shu-ju-ku/'>数据库 (2)</a></li><li><a href='/blog/categories/sheng-huo-pian-duan/'>生活片段 (10)</a></li><li><a href='/blog/categories/zhi-ye-sheng-ya/'>职业生涯 (7)</a></li><li><a href='/blog/categories/du-shu/'>读书 (2)</a></li></ul>
</section>
<section>
  <h1>外部链接</h1>
    <ul id="外部链接">
    	<li><a href="https://developer.apple.com">苹果开发者中心</a> </li>
    	<li><a href="http://stackoverflow.com/questions/tagged/ios">stackoverflow</a></li>
    	<li><a href="http://ksnowlv.blog.163.com/blog/#m=0">ksnowlv网易博客</a></li>
	</ul>
</section>

  
</aside>


    </div>
  </div>
  <footer role="contentinfo"><p>
  Copyright &copy; 2017 - 律威 -
  <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>

  <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1253538110'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "v1.cnzz.com/z_stat.php%3Fid%3D1253538110%26online%3D1' type='text/javascript'%3E%3C/script%3E"));</script>

  <script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F4c1727a94ea20751730e8a556dbdbf82' type='text/javascript'%3E%3C/script%3E"));
</script>

</p>



</footer>
  

<script type="text/javascript">
      var disqus_shortname = 'ksnowlv';
      
        
        // var disqus_developer = 1;
        var disqus_identifier = 'http://ksnowlv.github.io/blog/2014/08/09/python-diao-shi-zhi-pdb/';
        var disqus_url = 'http://ksnowlv.github.io/blog/2014/08/09/python-diao-shi-zhi-pdb/';
        var disqus_script = 'embed.js';
      
    (function () {
      var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
      dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
      (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    }());
</script>








</body>
</html>
